import { adminUrl } from "@/utils/baseUrl.js";
import request from "@/utils/request";

// 创建教师管理
export function createTeacherTeachers(data) {
  return request({
    url: adminUrl + "/collegebase/teacher-teachers/create",
    method: "post",
    data: data,
  });
}

// 更新教师管理
export function updateTeacherTeachers(data) {
  return request({
    url: adminUrl + "/collegebase/teacher-teachers/update",
    method: "put",
    data: data,
  });
}

// 删除教师管理
export function deleteTeacherTeachers(id) {
  return request({
    url: adminUrl + "/collegebase/teacher-teachers/delete?id=" + id,
    method: "delete",
  });
}

// 获得教师管理
export function getTeacherTeachers(id) {
  return request({
    url: adminUrl + "/collegebase/teacher-teachers/get?id=" + id,
    method: "get",
  });
}

// 获得教师管理分页
export function getTeacherTeachersPage(query) {
  return request({
    url: adminUrl + "/collegebase/teacher-teachers/page",
    method: "get",
    params: query,
  });
}
// 根据学院教师管理列表
export function getTeacherTeachersList(query) {
  return request({
    url: adminUrl + "/collegebase/teacher-teachers/getByCollegeId",
    method: "get",
    params: query,
  });
}
// 导出教师管理 Excel
export function exportTeacherTeachersExcel(query) {
  return request({
    url: adminUrl + "/collegebase/teacher-teachers/export-excel",
    method: "get",
    params: query,
    responseType: "blob",
  });
}
